Skip to content

Conversation

huonw
Copy link

@huonw huonw commented Jan 8, 2019

This expands the documentation to explicitly have the example code make test depend on compile:scalastyle, that is, make sbt test also run scalastyle on the main code.

This is designed to be the common case, and a slightly "safer" default. It seems like many people wanting to have scalastyle as part of their tests will want to also be testing their main code. And, as a default, people copying in the code without fully understanding it (or, maybe, without fully understanding sbt's compilation model) will have all their code checked. With the new, one only has to delete some lines to have sbt test only run scalastyle on the tests; with the old, one has to realise that some code needs to be added, and then add it to have sbt test run scalastyle on the main code. The first of those seems simpler.

This expands the documentation to explicitly have the example code make `test` depend on `compile:scalastyle`, that is, make `sbt test` also run scalastyle on the main code.

This is designed to be the common case, and a slightly "safer" default. It seems like many people wanting to have scalastyle as part of their tests will want to also be testing their main code. And, as a default, people copying in the code without fully understanding it (or, maybe, without fully understanding sbt's compilation model) will have all their code checked. With the new, one only has to delete some lines to have `sbt test` only run scalastyle on the tests; with the old, one has to realise that some code needs to be added, and then add it to have `sbt test` run scalastyle on the main code. The first of those seems simpler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant